package com.wtzz.police.base.service;

import com.wtzz.police.base.bean.dto.UserDto;
import com.wtzz.police.base.bean.req.UserFilterDto;
import com.wtzz.police.base.bean.dto.UserInfoDto;
import com.wtzz.police.base.entity.User;
import com.wtzz.police.base.service.base.BaseCurdService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

@Transactional
public interface UserService extends BaseCurdService<User, String>,UserDetailsService {

	Optional<User> findByUsername(String username);

	void resetPassword(String id) ;

	void changePassword(String oldPassword, String password);

	void setEnabled(String id, Boolean enable);

	Page<UserInfoDto> listNotDeleted(Pageable pageable, UserFilterDto userFilterDto);

}
